import { useContext, useMemo } from 'react';
import { Page } from '../constant/Page';
import { ThemeContext } from '../context/ThemeContext';


const useNav = () => {
  const { theme, image: { IcAccount, IcOrder, IcProperty, IcSupport, IcTrade, IcReport, IcDownload } } = useContext(ThemeContext);

  return useMemo(() => {
    return [
      { path: Page.Trade, id: 'nav.trade', value: '出售', img: IcTrade },
      { path: Page.Order, id: 'nav.order', value: '订单', img: IcOrder },
      { path: Page.Property, id: 'nav.property', value: '资产', img: IcProperty },
      { path: Page.Account, id: 'nav.account', value: '帐号', img: IcAccount },
      { path: Page.Report, id: 'nav.report', value: '报表', img: IcReport },
      { path: Page.Support, id: 'nav.support', value: '支援', img: IcSupport },
      // { path: Page.Download, id: 'nav.download', value: '下载', img: IcDownload },
      { path: Page.EnableTfa, id: 'nav.enableTfa', value: '下载', img: IcDownload },
    ];
  }, [theme]);
};

export default useNav;
